package com.library.mapper;


import com.library.bean.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookMapper {

    //查询所有书本
    List<Book> selectAllBooks();

    //删除书本
    int deleteBook(int bookId);

    //根据书本id查询书本
    Book selectBookById(int bookId);

    //修改书本
    int updateBook(Book book);

    //添加书本
    int insertBook(Book book);

    //根据bookName查询书本
    Book selectBookByName(String bookName);

    //更改bookCover
    int updateBookCover(@Param("bookName") String bookName,@Param("bookCover") String bookCover);

    //多条件查询
    List<Book> findBooksByConditions(@Param("book") Book book,@Param("startDate") String startDate,@Param("endDate") String endDate);


}
